package com.jsp.service;

import java.sql.SQLException;

import com.jsp.bean.UserBean;
import com.jsp.dao.UserDao;

public class UserService {

	
	private UserDao userDao;
	private UserBean user;
	
	public UserBean login(String name, String password) throws SQLException{
		//����Ϣ��װ��user����
		user =new UserBean(name, password);	
	    userDao =new UserDao();
	    	    
		//����login����������֤
		
		return userDao.login(user);
		
	}
	public UserBean register(String name, String password, String name1, String number,
			String address, String idcard, String job ) throws SQLException{
		user =new UserBean(name,password,name1,number,address,idcard,job) ;
		userDao =new UserDao();
		
		return userDao.register(user);
	}
	
}
